***************************************************************
HiMIPv6 Project 
Installation Guide for Root Foreign Mobility Agent

By Chung-Chun Huang, Cheng-Wei Lee, Fan Liu, and 
Professor Yeali S. Sun
***************************************************************

0. Install RedHat 7.2,including the kernel source on your machines. 
	We recommand that you choose LILO to be boot manager.
	
	Copy the entire data on the HiMIPv6_Install_packages to SOMEWHERE.
	We STRONGLY recommand that SOMEWHERR = /root
	

1. Patch MobileIPv6/HiMIPv6 patch file, and make new kernel

	a. Backup Liuux source(Optional)
		# tar -zcvf /usr/src/linux-2.4.7-10.tgz /usr/src/linux-2.4.7-10

	b. Generate the file: /usr/src/linux-2.4/.config
		# cd /usr/src/linux-2.4.7-10
    	# make menuconfig
    	Make no changes. Save and Exit.

	c. Patch MobileIPv6
		# cd SOMEWHERE
		# tar -zxvf mipv6-0.9-v2.4.7.tar.gz
		# cp SOMEWHERE/mipv6-0.9-v2.4.7/mipv6-0.9-v2.4.7.patch /usr/src/linux-2.4.7-10
		# cd /usr/src/linux-2.4.7-10
		# patch -p1 < mipv6-0.9-v2.4.7.patch

	d. Patch HiMIPv6 
		# cp SOMEWHERE/HiMIPv6_FMA-v2.4.7.patch /usr/src/linux-2.4.7-10
		# cd /usr/src/linux-2.4
		# patch -p1 < HiMIPv6_FMA-v2.4.7.patch

	e. Have the kernel modules needed selected
		# cd /usr/src/linux-2.4.7-10
		# make menuconfig
		In 'Networking Options -->', select 'IPv6: Mobility Support (EXPERIMENTAL)'.
		Also select 'MIPv6: FMA Hierarchy(EXPERIMENTAL)'.

	f. Make kernel
		# cd /usr/src/linux-2.4.7-10
		# make clean;make oldconfig;make dep;make bzImage
		# cp arch/i386/boot/bzImage /boot/HiMIPv6-2.4.7
		Add the new kernel image 'HiMIPv6-2.4.7' to boot manager
	
		If you choose LILO to be boot manager, edit '/etc/lilo.conf'.
		The file may be modified and looked like 'SOMEWHERE/lilo.conf'
		After modifying lilo.conf,
		# lilo
		
	g.
		# make modules
		# reboot
		Use HiMIPv6-2.4.7 kernel image to boot.
		# cd /usr/src/linux-2.4.7-10
		# make modules_install	

	h. Install mipdiag tool
		# cd SOMEWHERE/mipv6-0.9-v2.4.7/userspace/
		# ./configure
		# make;make install
		# mknod /dev/mipv6_dev c 0xf9 0
	
	i. Patch mipdiag tool
		# cp SOMEWHERE/mipdiag.c SOMEWHERE/mipv6-0.9-v2.4.7/userspace/
		replace the original file
		# make;make install



2BInstall the usagi package(include ping6,telnet for IPv6v6, ftp for IPv6, radvd...)

	a. Extract usagi-linux24-s20020930.tar.bz2
		# cd SOMEWHERE
		# bzip2 -cd usagi-linux24-s20020930.tar.bz2 | tar xvf -
		
	b. Install
		# cd SOMEWHERE/usagi
		# make prepare TARGET=linux24
		# cd SOMEWHERE/usagi/usagi
		# ./configure
		# make;make install
		
	c. Copy the inetd deamon configuration file to /etc
		# cp SOMEWHERE/usagi/usagi/inetd/etc/inetd.conf.sample /etc/inetd.conf
		


3BInstall SNMP Manage System(Optional)

	a. Extract and install net-snmp-5.0.3.tar.gz
		# cd SOMEWHERE
		# tar -zxvf  net-snmp-5.0.3.tar.gz
		# cp SOMEWHERE/mibHiMIPv6.c  SOMEWHERE/net_snmp_5.0.3/agent/mibgroup
		# cp SOMEWHERE/mibHiMIPv6.h  SOMEWHERE/net_snmp_5.0.3/agent/mibgroup
		# cd SOMEWHERE/net_snmp_5.0.3
		#./configure -with-mib-modules="mibHiMIPv6"
		Answer every question by pressing Enter.
		
		# make;umask 022;make install
		
		Add a file named 'snmpd.conf' in '/usr/local/share/snmp/',
		containing the following words:

		 rocommunity public
		 rwcommunity private	


4.Final configurations
	# cp SOMEWHERE/hosts /etc/hosts
	# chmod 755 SOMEWHERE/RFMA/RFMA.sh

	After Root Foreign Mobility Agent booted, use
	# SOMEWHERE/RFMA/RFMA.sh
	to get HiMIPv6 test bed ready	